<?php
/**
*销售数据分析
*/
require('./include/init.php');

//连接数据库
$redis = new Redis();
  //连接服务器
  $redis->connect("localhost");
  //授权
  $redis->auth("redis=pwd@2016");

//地址栏传来的地址,根据此地址

$address=$_REQUEST['address'];

switch ($address) {
  case '北京博瑞祥星汽车销售有限公司':
    $hash='4S_SaleDirector_brxx';
    break;
  case '义乌市博奥汽车销售服务有限公司':
    $hash='4S_SaleDirector_ywba';
    break;
  case '江苏天奥汽车销售服务有限公司':
    $hash='4S_SaleDirector_jsta';
    break;
  case '广东粤奥汽车销售服务有限公司':
    $hash='4S_SaleDirector_gdya';
    break;
  case '辽宁鑫迪汽车销售服务有限公司':
    $hash='4S_SaleDirector_lnxd';
    break;
  case '成都新元素雅麓汽车销售服务有限公司':
    $hash='4S_SaleDirector_cdyl';
    break;
  case '云南驰泰汽车销售服务有限公司':
    $hash='4S_SaleDirector_ynct';
    break;
  case '宁夏奥立升汽车销售服务有限公司':
    $hash='4S_SaleDirector_nxals';
    break;
  case '陕西奥诚汽车销售服务有限公司':
    $hash='4S_SaleDirector_sxac';
    break;
}
$data=$redis->hmget($hash, array(
'nowservice',
'yesdservice',
'onejk',
'twojk',
'threejk',
'fourjk',
'fivejk',
'sixjk',
'sevenjk',
'firstjk',
'secondjk',
'thirdjk',
'fourthjk',
'firstmonth',
'secondmonth',
'thirdmonth',
'fourthmonth',
'allday',
'vtwo',
'vthree',
'vmore',
'vone',
));

$nowservice=$data['nowservice'];
$yesdservice=$data['yesdservice'];
$onejk=$data['onejk'];
$twojk=$data['twojk'];
$threejk=$data['threejk'];
$fourjk=$data['fourjk'];
$fivejk=$data['fivejk'];
$sixjk=$data['sixjk'];
$sevenjk=$data['sevenjk'];
$firstjk=$data['firstjk'];
$secondjk=$data['secondjk'];
$thirdjk=$data['thirdjk'];
$fourthjk=$data['fourthjk'];
$firstmonth=$data['firstmonth'];
$secondmonth=$data['secondmonth'];
$thirdmonth=$data['thirdmonth'];
$fourthmonth=$data['fourthmonth'];
$allday=$data['allday'];
$vtwo=$data['vtwo'];
$vthree=$data['vthree'];
$vmore=$data['vmore'];
$vone=$data['vone'];

require(ROOT . 'view/iwocar5/4S_SaleDirector.html');
 ?>
